implementation to follow.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
$\mathit{RW}$ & {\tt MAC} & string & ethernet MAC address of virtual interface, as exposed to guest \\
$\mathit{RW}$ & {\tt MTU} & int & MTU in octets \\
$\mathit{RW}$ & {\tt qos/algorithm\_type} & string & QoS algorithm to use \\
-$\mathit{RW}$ & {\tt qos/algorithm\_params} & (string $\rightarrow$ string) Map & Paramters for chosen QoS algorithm \\
+$\mathit{RW}$ & {\tt qos/algorithm\_params} & (string $\rightarrow$ string) Map & parameters for chosen QoS algorithm \\
+$\mathit{RO}_\mathit{run}$ & {\tt qos/supported\_algorithms} & string Set & supported QoS algorithms for this VIF \\
$\mathit{RO}_\mathit{run}$ & {\tt metrics} & VIF\_metrics ref & metrics associated with this VIF. \\
\hline
\end{longtable}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_qos\_supported\_algorithms}
+
+{\bf Overview:}
+Get the qos/supported\_algorithms field of the given VIF.
+
+ \noindent {\bf Signature:}
+\begin{verbatim} (string Set) get_qos_supported_algorithms (session_id s, VIF ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VIF ref } & self & reference to the object \\ \hline
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:}
+{\tt
+string Set
+}
+
+
+value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
$\mathit{RW}$ & {\tt mode} & vbd\_mode & the mode the VBD should be mounted with \\
$\mathit{RW}$ & {\tt type} & vbd\_type & how the VBD will appear to the guest (e.g. disk or CD) \\
$\mathit{RW}$ & {\tt qos/algorithm\_type} & string & QoS algorithm to use \\
-$\mathit{RW}$ & {\tt qos/algorithm\_params} & (string $\rightarrow$ string) Map & Paramters for chosen QoS algorithm \\
-$\mathit{RO}_\mathit{run}$ & {\tt metrics} & VBD\_metrics ref & metrics associated with this VBD. \\
+$\mathit{RW}$ & {\tt qos/algorithm\_params} & (string $\rightarrow$ string) Map & parameters for chosen QoS algorithm \\
+$\mathit{RO}_\mathit{run}$ & {\tt qos/supported\_algorithms} & string Set & supported QoS algorithms for this VBD \\
+$\mathit{RO}_\mathit{run}$ & {\tt metrics} & VBD\_metrics ref & metrics associated with this VBD \\
\hline
\end{longtable}
\subsection{Additional RPCs associated with class: VBD}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_qos\_supported\_algorithms}
+
+{\bf Overview:}
+Get the qos/supported\_algorithms field of the given VBD.
+
+ \noindent {\bf Signature:}
+\begin{verbatim} (string Set) get_qos_supported_algorithms (session_id s, VBD ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VBD ref } & self & reference to the object \\ \hline
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:}
+{\tt
+string Set
+}
+
+
+value of the field
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
#define XEN_VBD_H
#include "xen_common.h"
+#include "xen_string_set.h"
#include "xen_string_string_map.h"
#include "xen_vbd_decl.h"
#include "xen_vbd_metrics_decl.h"
enum xen_vbd_type type;
char *qos_algorithm_type;
xen_string_string_map *qos_algorithm_params;
+ struct xen_string_set *qos_supported_algorithms;
struct xen_vbd_metrics_record_opt *metrics;
} xen_vbd_record;
xen_vbd_get_qos_algorithm_params(xen_session *session, xen_string_string_map **result, xen_vbd vbd);
+/**
+ * Get the qos/supported_algorithms field of the given VBD.
+ */
+extern bool
+xen_vbd_get_qos_supported_algorithms(xen_session *session, struct xen_string_set **result, xen_vbd vbd);
+
+
/**
* Get the metrics field of the given VBD.
*/
#include "xen_common.h"
#include "xen_network_decl.h"
+#include "xen_string_set.h"
#include "xen_string_string_map.h"
#include "xen_vif_decl.h"
#include "xen_vif_metrics_decl.h"
int64_t mtu;
char *qos_algorithm_type;
xen_string_string_map *qos_algorithm_params;
+ struct xen_string_set *qos_supported_algorithms;
struct xen_vif_metrics_record_opt *metrics;
} xen_vif_record;
xen_vif_get_qos_algorithm_params(xen_session *session, xen_string_string_map **result, xen_vif vif);
+/**
+ * Get the qos/supported_algorithms field of the given VIF.
+ */
+extern bool
+xen_vif_get_qos_supported_algorithms(xen_session *session, struct xen_string_set **result, xen_vif vif);
+
+
/**
* Get the metrics field of the given VIF.
*/
{ .key = "qos_algorithm_params",
.type = &abstract_type_string_string_map,
.offset = offsetof(xen_vbd_record, qos_algorithm_params) },
+ { .key = "qos_supported_algorithms",
+ .type = &abstract_type_string_set,
+ .offset = offsetof(xen_vbd_record, qos_supported_algorithms) },
{ .key = "metrics",
.type = &abstract_type_ref,
.offset = offsetof(xen_vbd_record, metrics) }
free(record->device);
free(record->qos_algorithm_type);
xen_string_string_map_free(record->qos_algorithm_params);
+ xen_string_set_free(record->qos_supported_algorithms);
xen_vbd_metrics_record_opt_free(record->metrics);
free(record);
}
}
+bool
+xen_vbd_get_qos_supported_algorithms(xen_session *session, struct xen_string_set **result, xen_vbd vbd)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = vbd }
+ };
+
+ abstract_type result_type = abstract_type_string_set;
+
+ *result = NULL;
+ XEN_CALL_("VBD.get_qos_supported_algorithms");
+ return session->ok;
+}
+
+
bool
xen_vbd_get_metrics(xen_session *session, xen_vbd_metrics *result, xen_vbd vbd)
{
{ .key = "qos_algorithm_params",
.type = &abstract_type_string_string_map,
.offset = offsetof(xen_vif_record, qos_algorithm_params) },
+ { .key = "qos_supported_algorithms",
+ .type = &abstract_type_string_set,
+ .offset = offsetof(xen_vif_record, qos_supported_algorithms) },
{ .key = "metrics",
.type = &abstract_type_ref,
.offset = offsetof(xen_vif_record, metrics) }
free(record->mac);
free(record->qos_algorithm_type);
xen_string_string_map_free(record->qos_algorithm_params);
+ xen_string_set_free(record->qos_supported_algorithms);
xen_vif_metrics_record_opt_free(record->metrics);
free(record);
}
}
+bool
+xen_vif_get_qos_supported_algorithms(xen_session *session, struct xen_string_set **result, xen_vif vif)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = vif }
+ };
+
+ abstract_type result_type = abstract_type_string_set;
+
+ *result = NULL;
+ XEN_CALL_("VIF.get_qos_supported_algorithms");
+ return session->ok;
+}
+
+
bool
xen_vif_get_metrics(xen_session *session, xen_vif_metrics *result, xen_vif vif)
{